package org.dftproject.genesis.ui.figures;

import org.eclipse.draw2d.FocusTraverseManager;
import org.eclipse.draw2d.SWTEventDispatcher;
import org.eclipse.swt.events.TraverseEvent;

/**
 * <code>SWTEventDispatcherEx</code> extends {@link SWTEventDispatcher} to
 * properly cycle focus on tab/shift-tab traversal (see
 * {@link FocusTraverseManager}).
 */
public class SWTEventDispatcherEx extends SWTEventDispatcher {

	@Override
	public void dispatchKeyTraversed(TraverseEvent e) {
		super.dispatchKeyTraversed(e);
		if (e.doit)
			getFocusTraverseManager().setCurrentFocusOwner(null);
	}

}
